/**
 *  Copyright (C) 2008-2013  Telosys project org. ( http://www.telosys.org/ )
 *
 *  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *          http://www.gnu.org/licenses/lgpl.html
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.telosys.common.output.error;


/**
 * Error fired during the generation of the "view" section in the output.
 * 
 * @author Laurent Guerin
 * @since 1.0.5
 *
 */
public class ViewOutputError extends OutputError
{
    private String    _sViewName = null ;

    private String    _sRenderer = null ;
   
    /**
     * Constructor
     * @param viewName
     * @param renderer
     * @param exception
     */
    public ViewOutputError(String viewName, String renderer, Throwable exception )
    {
        super(exception);
        _sViewName = viewName != null ? viewName : "" ;
        _sRenderer = renderer != null ? renderer : "" ;
    }

    /**
     * Constructor
     * @param viewName
     * @param renderer
     * @param message
     */
    public ViewOutputError(String viewName, String renderer, String message)
    {
        super(message);
        _sViewName = viewName != null ? viewName : "" ;
        _sRenderer = renderer != null ? renderer : "" ;
    }
    
    /**
     * Returns the name of the view (never null)
     * @return
     */
    public String getViewName()
    {
        return _sViewName;
    }
    
    /**
     * Returns the renderer of the view (never null)
     * @return
     */
    public String getRenderer()
    {
        return _sRenderer;
    }

}
